import request from '@/utils/request.js';
import qs from "qs";

/**
 * 充值 【OK】
 * @param {Object} params
 */
export function recharge(params) {
	return request({
	    url: "/finance/recharge",
	    method: "post",
	    data:params,
	  });
}
/**
 * bonus充值 
 * @param {Object} params
 */
export function rechargeByBonus(params) {
	return request({
	    url: "/finance/rechargeByBonus",
	    method: "post",
	    data:params,
	  });
}

/**
 * 充值回执【OK】
 * @param {Object} params
 */
export function feedback(params) {
	return request({
	    url: "/finance/recharge/feedback",
	    method: "post",
	    data:params,
	});
}

/**
 * 计算充值手续费 【OK】
 * @param {Object} params
 */
export function rechargeFee(params) {
	return request({
	    url: "/finance/calculate/rechargeFee",
	    method: "post",
	    data:params,
	});
}
/**
 * 取消充值 【OK】
 * @param {Object} params
 */
export function cancelRecharge(params) {
	return request({
	    url: "/finance/cancelRecharge",
	    method: "post",
	    data:params,
	});
}
 
/**
* 获取充值订单 【ok】
* @param {Object} params
*/
export function getRechargeOrder(params) {
	return request({
		url: "/finance/getRechargeOrder",
		method: "get",
		data:params,
	});
}
/**
* 查询充值订单
* @param {Object} params
*/
export function getRechargeList(params) {
	return request({
		url: "/finance/getRechargeList",
		method: "get",
		data:params,
	});
}

/**
 * 查询充值订单详情 【OK】
 * @param {Object} params
 */
export function getRechargeDetail(params) {
	return request({
	    url: "/finance/getRechargeDetail",
	    method: "get",
	    data:params,
	});
}
/**
 * 查询充值地址 【OK】
 * @param {Object} params
 */
export function getRechargeChain(params) {
	return request({
	    url: "/finance/getRechargeChain",
	    method: "get",
	    data:params,
	});
}
/**
 * 查询账户余额 【OK】
 * @param {Object} params
 */
export function getAcctBalance(params) {
	return request({
	    url: "/finance/getAcctBalance",
	    method: "get",
	    data:params,
	});
}


/**
 * 查询余额充值记录 【OK】
 * @param {Object} params
 */
export function getUserRechargeList(params) {
	return request({
	    url: "/finance/getUserRechargeList",
	    method: "get",
	    data:params,
	});
}
/**
 * 查询卡片消费记录【OK】
 * @param {Object} params
 */
export function getCardTradeList(params) {
	return request({
	    url: "/finance/getCardTradeList",
	    method: "get",
	    data:params,
	});
}
/**
 * 查询卡片充值记录【OK】
 * @param {Object} params
 */
export function getCardRechargeList(params) {
	return request({
	    url: "/finance/getCardRechargeList",
	    method: "get",
	    data:params,
	});
}
/**
 * 查询账户流水【OK】
 * @param {Object} params
 */
export function getAccountFlows(params) {
	return request({
	    url: "/finance/getAccountFlows",
	    method: "get",
	    data:params,
	});
}

/**
 * 查询转账手续费比例
 * @param {Object} params
 */
export function getTransferFeeRate(params) {
	return request({
	    url: "/finance/getTransferFeeRate",
	    method: "get",
	    data:params,
	});
}
/**
 * 查询卡转账记录
 * @param {Object} params
 */
export function getCardTransferList(params) {
	return request({
	    url: "/finance/getCardTransferList",
	    method: "get",
	    data:params,
	});
}

/**
 * 钱包转账
 * @param {Object} params
 */
export function walletTransfer(params) {
	return request({
	    url: "/finance/walletTransfer",
	    method: "post",
	    data:params,
	});
}
/**
 * 他人卡转账
 * @param {Object} params
 */
export function cardTransferOut(params) {
	return request({
	    url: "/finance/cardTransferOut",
	    method: "post",
	    data:params,
	});
}
/**
 * 本人卡转账
 * @param {Object} params
 */
export function cardTransferSelf(params) {
	return request({
	    url: "/finance/cardTransferSelf",
	    method: "post",
	    data:params,
	});
}